package com.lm.elastic.repository;


import com.lm.elastic.model.Article;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ArticleRepository extends ElasticsearchRepository<Article, String> {

    // 根据标题模糊搜索
    List<Article> findByTitleContaining(String keyword);

    // 根据作者查找
    List<Article> findByAuthor(String author);
}
